<!DOCTYPE html>












  


<html class="theme-next pisces use-motion" lang="zh-Hans">
<head><meta name="generator" content="Hexo 3.8.0">
  <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
























<link rel="stylesheet" href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2">

<link rel="stylesheet" href="/css/main.css?v=7.1.1">


  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png?v=7.1.1">


  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png?v=7.1.1">


  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png?v=7.1.1">


  <link rel="mask-icon" href="/images/logo.svg?v=7.1.1" color="#222">







<script id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Pisces',
    version: '7.1.1',
    sidebar: {"position":"left","display":"post","offset":12,"onmobile":false,"dimmer":false},
    back2top: true,
    back2top_sidebar: false,
    fancybox: false,
    fastclick: false,
    lazyload: false,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>


  




  <meta name="description" content="利用 Vultr 搭建 Shadowsocks（科学上网）">
<meta name="keywords" content="利器-科学上网">
<meta property="og:type" content="article">
<meta property="og:title" content="利用Vultr搭建Shadowsocks">
<meta property="og:url" content="http://SpiritPoet.github.io/2019/06/08/利用Vultr搭建Shadowsocks/index.html">
<meta property="og:site_name" content="超级码栗的博客">
<meta property="og:description" content="利用 Vultr 搭建 Shadowsocks（科学上网）">
<meta property="og:locale" content="zh-Hans">
<meta property="og:image" content="http://spiritpoet.github.io/2019/06/08/利用Vultr搭建Shadowsocks/1.png">
<meta property="og:image" content="http://spiritpoet.github.io/2019/06/08/利用Vultr搭建Shadowsocks/2.png">
<meta property="og:image" content="http://spiritpoet.github.io/2019/06/08/利用Vultr搭建Shadowsocks/8.png">
<meta property="og:image" content="http://spiritpoet.github.io/2019/06/08/利用Vultr搭建Shadowsocks/3.png">
<meta property="og:image" content="http://spiritpoet.github.io/2019/06/08/利用Vultr搭建Shadowsocks/4.png">
<meta property="og:image" content="http://spiritpoet.github.io/2019/06/08/利用Vultr搭建Shadowsocks/5.png">
<meta property="og:image" content="http://spiritpoet.github.io/2019/06/08/利用Vultr搭建Shadowsocks/6.png">
<meta property="og:image" content="http://spiritpoet.github.io/2019/06/08/利用Vultr搭建Shadowsocks/7.png">
<meta property="og:image" content="http://spiritpoet.github.io/2019/06/08/利用Vultr搭建Shadowsocks/10.png">
<meta property="og:image" content="http://spiritpoet.github.io/2019/06/08/利用Vultr搭建Shadowsocks/11.png">
<meta property="og:image" content="http://spiritpoet.github.io/2019/06/08/利用Vultr搭建Shadowsocks/14.png">
<meta property="og:image" content="http://spiritpoet.github.io/2019/06/08/利用Vultr搭建Shadowsocks/13.png">
<meta property="og:image" content="http://spiritpoet.github.io/2019/06/08/利用Vultr搭建Shadowsocks/12.png">
<meta property="og:image" content="http://spiritpoet.github.io/2019/06/08/利用Vultr搭建Shadowsocks/15.png">
<meta property="og:updated_time" content="2019-06-08T01:39:25.228Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="利用Vultr搭建Shadowsocks">
<meta name="twitter:description" content="利用 Vultr 搭建 Shadowsocks（科学上网）">
<meta name="twitter:image" content="http://spiritpoet.github.io/2019/06/08/利用Vultr搭建Shadowsocks/1.png">





  
  
  <link rel="canonical" href="http://SpiritPoet.github.io/2019/06/08/利用Vultr搭建Shadowsocks/">



<script id="page.configurations">
  CONFIG.page = {
    sidebar: "",
  };
</script>

  <title>利用Vultr搭建Shadowsocks | 超级码栗的博客</title>
  












  <noscript>
  <style>
  .use-motion .motion-element,
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-title { opacity: initial; }

  .use-motion .logo,
  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta">
    

    <div class="custom-logo-site-title">
      <a href="/" class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">超级码栗的博客</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
    
      
        <p class="site-subtitle">上士闻道，勤而行之</p>
      
    
    
  </div>

  <div class="site-nav-toggle">
    <button aria-label="Toggle navigation bar">
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>



<nav class="site-nav">
  
    <ul id="menu" class="menu">
      
        
        
        
          
          <li class="menu-item menu-item-home">

    
    
    
      
    

    

    <a href="/" rel="section"><i class="menu-item-icon fa fa-fw fa-home"></i> <br>Home</a>

  </li>
        
        
        
          
          <li class="menu-item menu-item-tags">

    
    
    
      
    

    

    <a href="/tags/" rel="section"><i class="menu-item-icon fa fa-fw fa-tags"></i> <br>Tags</a>

  </li>
        
        
        
          
          <li class="menu-item menu-item-categories">

    
    
    
      
    

    

    <a href="/categories/" rel="section"><i class="menu-item-icon fa fa-fw fa-th"></i> <br>Categories</a>

  </li>
        
        
        
          
          <li class="menu-item menu-item-archives">

    
    
    
      
    

    

    <a href="/archives/" rel="section"><i class="menu-item-icon fa fa-fw fa-archive"></i> <br>Archives</a>

  </li>
        
        
        
          
          <li class="menu-item menu-item-about">

    
    
    
      
    

    

    <a href="/about/" rel="section"><i class="menu-item-icon fa fa-fw fa-user"></i> <br>About</a>

  </li>

      
      
    </ul>
  

  

  
</nav>



  



</div>
    </header>

    
  
  

  

  <a href="https://github.com/SpiritPoet" class="github-corner" title="Follow me on GitHub" aria-label="Follow me on GitHub" rel="noopener" target="_blank"><svg width="80" height="80" viewbox="0 0 250 250" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"/><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"/><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"/></svg></a>



    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          
            

          
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://SpiritPoet.github.io/2019/06/08/利用Vultr搭建Shadowsocks/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="码栗">
      <meta itemprop="description" content="一位码栗的技术分享，计算机基础，计算机专业知识，java编程">
      <meta itemprop="image" content="/images/avatar/avatar.jpeg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="超级码栗的博客">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">利用Vultr搭建Shadowsocks

              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">

            
            
            

            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">Posted on</span>
              

              
                
              

              <time title="Created: 2019-06-08 09:17:16 / Modified: 09:39:25" itemprop="dateCreated datePublished" datetime="2019-06-08T09:17:16+08:00">2019-06-08</time>
            

            
              

              
            
          </span>

          
            <span class="post-category">
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">In</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/工欲善其事必先利其器/" itemprop="url" rel="index"><span itemprop="name">工欲善其事必先利其器</span></a></span>

                
                
              
            </span>
          

          
            
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <h1 id="利用-Vultr-搭建-Shadowsocks（科学上网）"><a href="#利用-Vultr-搭建-Shadowsocks（科学上网）" class="headerlink" title="利用 Vultr 搭建 Shadowsocks（科学上网）"></a>利用 Vultr 搭建 Shadowsocks（科学上网）</h1><p><img src="/2019/06/08/利用Vultr搭建Shadowsocks/1.png" alt="logo"></p>
<a id="more"></a>

<h2 id="搭建步骤"><a href="#搭建步骤" class="headerlink" title="搭建步骤"></a>搭建步骤</h2><blockquote>
<p>1.配置服务器 2.在服务器上安装 Shadowsocks 3.安装 Shadowsocks 客户版 4.开启 TCP BBR 算法</p>
</blockquote>
<h3 id="配置服务器"><a href="#配置服务器" class="headerlink" title="配置服务器"></a>配置服务器</h3><p>1.创建<a href="https://www.vultr.com/" target="_blank" rel="noopener">Vultr</a>账号<br><img src="/2019/06/08/利用Vultr搭建Shadowsocks/2.png" alt="Alt Text"></p>
<p>2.账户充值(支付宝可以支付 根据自身条件选择)<br><img src="/2019/06/08/利用Vultr搭建Shadowsocks/8.png" alt="Alt Text"></p>
<p>3.创建服务器<br><img src="/2019/06/08/利用Vultr搭建Shadowsocks/3.png" alt="Alt Text"></p>
<ul>
<li>选择服务器所在地<br><img src="/2019/06/08/利用Vultr搭建Shadowsocks/4.png" alt="Alt Text"></li>
<li>选择服务器操作系统<br><img src="/2019/06/08/利用Vultr搭建Shadowsocks/5.png" alt="Alt Text"></li>
<li>选择服务 (这里如果只是上上网,$2.5 的足够)<br><img src="/2019/06/08/利用Vultr搭建Shadowsocks/6.png" alt="Alt Text"></li>
<li>选择完服务后其他的可以忽略 直接点击最下面右下角的 Deploy</li>
<li>创建完成后 Server 里显示 正在初始化 等 1 分钟即可<br><img src="/2019/06/08/利用Vultr搭建Shadowsocks/7.png" alt="Alt Text"></li>
<li>点击…进入管理界面，记住三个箭头的数据 后面有用！<br><img src="/2019/06/08/利用Vultr搭建Shadowsocks/10.png" alt="Alt Text"><br><img src="/2019/06/08/利用Vultr搭建Shadowsocks/11.png" alt="Alt Text"></li>
</ul>
<h3 id="安装-Shadowsocks"><a href="#安装-Shadowsocks" class="headerlink" title="安装 Shadowsocks"></a>安装 Shadowsocks</h3><p>1.首先，下载 <a href="http://ultra.pr.erau.edu/~jaffem/tutorial/SSH_secure_shell_client.htm" target="_blank" rel="noopener">Secure Shell Client</a> 2.通过 Shell Client 连接服务器</p>
<blockquote>
<p>1.输入 IP 和 UserName<br><img src="/2019/06/08/利用Vultr搭建Shadowsocks/14.png" alt="Alt Text"> 2.输入 Password<br><img src="/2019/06/08/利用Vultr搭建Shadowsocks/13.png" alt="Alt Text"></p>
</blockquote>
<p>3.运用脚本安装</p>
<blockquote>
<p>1.运行如下代码</p>
</blockquote>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">wget --no-check-certificate -O shadowsocks-all.sh https://raw.githubusercontent.com/teddysun/shadowsocks_install/master/shadowsocks-all.sh</span><br><span class="line">chmod +x shadowsocks-all.sh</span><br><span class="line">./shadowsocks-all.sh 2&gt;&amp;1 | tee shadowsocks-all.log</span><br></pre></td></tr></table></figure>

<blockquote>
<p>2.下面会出现让你选择脚本(笔者直接回车，默认 Python 版),然后让你设置连接密码和端口(笔者随便用了一个密码 123456，端口 2018)。接着回车等待安装完成，这里时间稍微有点长</p>
</blockquote>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br></pre></td><td class="code"><pre><span class="line">Which Shadowsocks server you&apos;d select:</span><br><span class="line">1) Shadowsocks-Python</span><br><span class="line">2) ShadowsocksR</span><br><span class="line">3) Shadowsocks-Go</span><br><span class="line">4) Shadowsocks-libev</span><br><span class="line">Please enter a number (Default Shadowsocks-Python):</span><br><span class="line"></span><br><span class="line">You choose = Shadowsocks-Python</span><br><span class="line"></span><br><span class="line">Please enter password for Shadowsocks-Python</span><br><span class="line">(Default password: teddysun.com):123456</span><br><span class="line"></span><br><span class="line">password = 123456</span><br><span class="line"></span><br><span class="line">Please enter a port for Shadowsocks-Python [1-65535]</span><br><span class="line">(Default port: 11912):2018</span><br></pre></td></tr></table></figure>

<blockquote>
<p>3.安装完成提示如下</p>
</blockquote>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">Welcome to visit:https://teddysun.com/486.html</span><br><span class="line">Enjoy it!</span><br><span class="line">[root@vultr etc]#</span><br></pre></td></tr></table></figure>

<blockquote>
<p>4.校验是否启动 Shadowsocks</p>
</blockquote>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">[root@vultr /]# ./etc/init.d/shadowsocks-python status</span><br><span class="line">Shadowsocks (pid 17336) is running...</span><br></pre></td></tr></table></figure>

<blockquote>
<p>5.关于脚本的命令以及如何配置多用户，更改 config 文件等请阅读<a href="https://teddysun.com/486.html" target="_blank" rel="noopener">秋水逸冰 Shadowsocks 一键安装脚本（四合一）</a></p>
</blockquote>
<h3 id="安装-Shadowsocks-客户版"><a href="#安装-Shadowsocks-客户版" class="headerlink" title="安装 Shadowsocks 客户版"></a>安装 Shadowsocks 客户版</h3><blockquote>
<p>1.<a href="https://github.com/shadowsocks/shadowsocks-windows/releases" target="_blank" rel="noopener">常规版</a>【推荐】 2.<a href="https://github.com/shadowsocksrr/shadowsocksr-csharp/releases" target="_blank" rel="noopener">SSR 版</a></p>
</blockquote>
<h4 id="科学上网"><a href="#科学上网" class="headerlink" title="科学上网"></a>科学上网</h4><blockquote>
<p>1.如果记不得一开始安装时输入的密码和端口，请输入以下命令查看:</p>
</blockquote>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line">[root@vultr ~]# vi /etc/shadowsocks-python/config.json</span><br><span class="line">&#123;</span><br><span class="line">    &quot;server&quot;:&quot;0.0.0.0&quot;,</span><br><span class="line">    &quot;server_port&quot;:2018,</span><br><span class="line">    &quot;local_address&quot;:&quot;127.0.0.1&quot;,</span><br><span class="line">    &quot;local_port&quot;:1080,</span><br><span class="line">    &quot;password&quot;:&quot;123456&quot;,</span><br><span class="line">    &quot;timeout&quot;:300,</span><br><span class="line">    &quot;method&quot;:&quot;aes-256-gcm&quot;,</span><br><span class="line">    &quot;fast_open&quot;:true</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<blockquote>
<p>2.配置客户端</p>
</blockquote>
<ul>
<li>1.输入 IP、端口和密码 这里要特别注意密码下面的加密哪一项 一定要和你 config.json 里的 method 的值对应 图中和我上面代码里的不对应所以是错误的 一定不要按图中的加密方式配置 要对应你的 config<br><img src="/2019/06/08/利用Vultr搭建Shadowsocks/12.png" alt="Alt Text"></li>
<li>2.右击程序小飞机图标 勾选上启动系统代理就可以上网了<br><img src="/2019/06/08/利用Vultr搭建Shadowsocks/15.png" alt="Alt Text"></li>
<li>3.系统代理模式有两种，PAC 和全局，PAC 是部分网页通过 ss，全局是所有流量都通过 ss（比如打游戏就要开全局）</li>
<li>4.至此属于你个人的 Shadowsocks 服务就搭建好了</li>
</ul>
<h3 id="开启-BBR-加速"><a href="#开启-BBR-加速" class="headerlink" title="开启 BBR 加速"></a>开启 BBR 加速</h3><blockquote>
<p>1.什么是 BBR?</p>
</blockquote>
<p>TCP BBR 致力于解决两个问题 1.在一定丢包率的网络链路上充分利用带宽 2.降低网络链路上的 Buffer 占用率，从而降低延迟</p>
<blockquote>
<p>2.为什么开启 BBR?</p>
</blockquote>
<p>就是让你更爽</p>
<blockquote>
<p>3.如何开启 TCP BBR ?</p>
</blockquote>
<p>我只提供出 CentOS7 的开启方法 其他系统 <a href="https://www.baidu.com/" target="_blank" rel="noopener">百度一下 你就知道</a></p>
<ul>
<li>1.首先更新系统，输入一下命令</li>
</ul>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">yum update -y</span><br></pre></td></tr></table></figure>

<pre><code>直至出现 Complete!</code></pre><ul>
<li>2.安装内核</li>
</ul>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org</span><br></pre></td></tr></table></figure>

<pre><code><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm</span><br></pre></td></tr></table></figure>

<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">yum --enablerepo=elrepo-kernel install kernel-ml</span><br></pre></td></tr></table></figure></code></pre><ul>
<li>3.检查是否已安装</li>
</ul>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">awk -F\&apos; &apos;$1==&quot;menuentry &quot; &#123;print i++ &quot; : &quot; $2&#125;&apos; /etc/grub2.cfg</span><br></pre></td></tr></table></figure>

<ul>
<li>返回如下信息</li>
</ul>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">0 : CentOS Linux (4.16.0-1.el7.elrepo.x86_64) 7 (Core)</span><br><span class="line">1 : CentOS Linux 7 Rescue 40f3bcfef5a2446abf07411db6ef7e14 (3.10.0-693.21.1.el7.x86_64)</span><br><span class="line">2 : CentOS Linux (3.10.0-693.21.1.el7.x86_64) 7 (Core)</span><br><span class="line">3 : CentOS Linux (3.10.0-693.11.6.el7.x86_64) 7 (Core)</span><br><span class="line">4 : CentOS Linux (3.10.0-693.el7.x86_64) 7 (Core)</span><br><span class="line">5 : CentOS Linux (0-rescue-c73a5ccf3b8145c3a675b64c4c3ab1d4) 7 (Core)</span><br></pre></td></tr></table></figure>

<ul>
<li>设置默认内核</li>
</ul>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">grub2-set-default 0</span><br></pre></td></tr></table></figure>

<ul>
<li>重启</li>
</ul>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">reboot</span><br></pre></td></tr></table></figure>

<ul>
<li>编辑系统配置文件</li>
</ul>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">vi /etc/sysctl.conf</span><br></pre></td></tr></table></figure>

<ul>
<li>添加或删除以下两行(注：按 i 进入编辑模式，编辑好后按 esc 退出编辑模式，再按 shift + zz 快速保存返回)</li>
</ul>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">net.core.default_qdisc = fq</span><br><span class="line">net.ipv4.tcp_congestion_control = bbr</span><br></pre></td></tr></table></figure>

<ul>
<li>生效配置文件</li>
</ul>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sysctl -p</span><br></pre></td></tr></table></figure>

<ul>
<li>检查 bbr 算法是否开启</li>
</ul>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">lsmod |grep bbr</span><br></pre></td></tr></table></figure>

<p>如果返回信息中有 tcp_bbr 就是开启成功！</p>
<p><strong>至此全部搭建成功！</strong></p>

      
    </div>

    

    
    
    

    

    
      
    
    

    

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/利器-科学上网/" rel="tag"># 利器-科学上网</a>
          
        </div>
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2019/06/05/FastDFS单机搭建/" rel="next" title="FastDFS单机搭建">
                <i class="fa fa-chevron-left"></i> FastDFS单机搭建
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>


  </div>


          </div>
          

  
    <div class="comments" id="gitalk-container">
    </div>

  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            Table of Contents
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            Overview
          </li>
        </ul>
      

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <img class="site-author-image" itemprop="image" src="/images/avatar/avatar.jpeg" alt="码栗">
            
              <p class="site-author-name" itemprop="name">码栗</p>
              <div class="site-description motion-element" itemprop="description">一位码栗的技术分享，计算机基础，计算机专业知识，java编程</div>
          </div>

          
            <nav class="site-state motion-element">
              
                <div class="site-state-item site-state-posts">
                
                  <a href="/archives/">
                
                    <span class="site-state-item-count">3</span>
                    <span class="site-state-item-name">posts</span>
                  </a>
                </div>
              

              
                
                
                <div class="site-state-item site-state-categories">
                  
                    
                      <a href="/categories/">
                    
                  
                    
                    
                      
                    
                      
                    
                    <span class="site-state-item-count">2</span>
                    <span class="site-state-item-name">categories</span>
                  </a>
                </div>
              

              
                
                
                <div class="site-state-item site-state-tags">
                  
                    
                      <a href="/tags/">
                    
                  
                    
                    
                      
                    
                      
                    
                      
                    
                    <span class="site-state-item-count">3</span>
                    <span class="site-state-item-name">tags</span>
                  </a>
                </div>
              
            </nav>
          

          

          

          

          

          
          

          
            
          
          

        </div>
      </div>

      
      <!--noindex-->
        <div class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
            
            
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#利用-Vultr-搭建-Shadowsocks（科学上网）"><span class="nav-number">1.</span> <span class="nav-text">利用 Vultr 搭建 Shadowsocks（科学上网）</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#搭建步骤"><span class="nav-number">1.1.</span> <span class="nav-text">搭建步骤</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#配置服务器"><span class="nav-number">1.1.1.</span> <span class="nav-text">配置服务器</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#安装-Shadowsocks"><span class="nav-number">1.1.2.</span> <span class="nav-text">安装 Shadowsocks</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#安装-Shadowsocks-客户版"><span class="nav-number">1.1.3.</span> <span class="nav-text">安装 Shadowsocks 客户版</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#科学上网"><span class="nav-number">1.1.3.1.</span> <span class="nav-text">科学上网</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#开启-BBR-加速"><span class="nav-number">1.1.4.</span> <span class="nav-text">开启 BBR 加速</span></a></li></ol></li></ol></li></ol></div>
            

          </div>
        </div>
      <!--/noindex-->
      

      

    </div>
  </aside>
  


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; <span itemprop="copyrightYear">2019</span>
  <span class="with-love" id="animate">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">码栗</span>

  

  
</div>









        








        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    

    

    
  </div>

  

<script>
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>














  
    
    
  
  <script color="0,0,255" opacity="0.5" zindex="-1" count="99" src="/lib/canvas-nest/canvas-nest.min.js"></script>













  
  <script src="/lib/jquery/index.js?v=2.1.3"></script>

  
  <script src="/lib/velocity/velocity.min.js?v=1.2.1"></script>

  
  <script src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>


  


  <script src="/js/utils.js?v=7.1.1"></script>

  <script src="/js/motion.js?v=7.1.1"></script>



  
  


  <script src="/js/affix.js?v=7.1.1"></script>

  <script src="/js/schemes/pisces.js?v=7.1.1"></script>



  
  <script src="/js/scrollspy.js?v=7.1.1"></script>
<script src="/js/post-details.js?v=7.1.1"></script>



  


  <script src="/js/next-boot.js?v=7.1.1"></script>


  

  

  

  


  
    

<script src="//cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.min.js"></script>



<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.min.css">



<script src="//cdn.jsdelivr.net/npm/js-md5@0.7.3/src/md5.min.js"></script>

<script>
  var gitalk = new Gitalk({
    clientID: '239f5efbab16e8446c8b',
    clientSecret: '96d72b9243997bbdc6f08b7b37a70be47f5ccf0a',
    repo: 'SpiritPoet.github.io',
    owner: 'SpiritPoet',
    admin: ['SpiritPoet'],
    id: md5(location.pathname),
    
      language: 'zh-CN',
    
    distractionFreeMode: 'true'
  });
  gitalk.render('gitalk-container');
</script>

  


  




  

  

  
  

  
  

  


  

  

  

  

  

  

  

  

  

  

  

</body>
</html>
